Carlos Garnacho [Fri, 11 Dec 2020 22:13:00 +0000 (23:13 +0100)]
gtk/entrycompletion: Ensure to show first row when shown, not allocated
This code was here in gtk3 to cater for the completion window being
positioned. That was only to meant once as long as the completion window
was shown.
This doesn't work as well for gtk4, ::size-allocate gets propagated from
the toplevel, so happens much more often for the completion window, this
ends up with the completion position being reset to the first row
frequently.
Do this simply once when popping up the completion, instead.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3083
Carlos Garnacho [Fri, 11 Dec 2020 16:56:14 +0000 (17:56 +0100)]
gtk/treeview: Position editable widgets correctly wrt left border
The coordinates are already widget-local here, not transformed by the
adjustment positions. Using the adjustment value here ends up pushing
the entry far from the left border.
The correct minimum value here is 0, which matches the treeview left
border.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3009
Carlos Garnacho [Fri, 11 Dec 2020 15:59:07 +0000 (16:59 +0100)]
gtk/modelbutton: Handle unpaired releases
Let model buttons handle unpaired releases, these may happen indirectly
e.g. due to other child menus being opened at the time. Clicking would
dismiss the menu, but the menu item beneath the pointer would not get
activated.
We can handle that button release though via ::unpaired-release, so
there's no second click required.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3463
Carlos Garnacho [Fri, 11 Dec 2020 15:22:26 +0000 (16:22 +0100)]
gtk/range: Move button release handling to GtkGestureDrag
Tracking it through the GtkGestureClick becomes a bit cumbersome for
handling of simultaneously pressed buttons. We can track ::stopped,
but that also emits for a number of situations where we want drag to
continue.
However, the GtkGestureDrag is grouped with the click gesture, and
knows better when to finish the drag gesture (not just because of a
button release), so hook drag and zoom mode finalization there.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
Emmanuele Bassi [Sat, 12 Dec 2020 00:01:38 +0000 (00:01 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2944
Emmanuele Bassi [Fri, 11 Dec 2020 23:42:25 +0000 (23:42 +0000)]
Update CODEOWNERS
Add me as the reference for the accessibility bits of the code base.
Emmanuele Bassi [Fri, 11 Dec 2020 23:41:51 +0000 (23:41 +0000)]
docs: Fix the Widget as Buildable example
The layout properties use an old name.
Kjartan Maraas [Fri, 11 Dec 2020 11:40:55 +0000 (11:40 +0000)]
Update Norwegian Bokmål translation
Florentina Mușat [Thu, 10 Dec 2020 15:34:51 +0000 (15:34 +0000)]
Update Romanian translation
Matthias Clasen [Thu, 10 Dec 2020 14:31:54 +0000 (14:31 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
docs: Update references to GtkWindow:fullscreened
See merge request GNOME/gtk!2943
Matthias Clasen [Thu, 10 Dec 2020 14:10:21 +0000 (09:10 -0500)]
docs: Update references to GtkWindow:fullscreened
The property got renamed from fullscreen to fullscreened.
Update all references.
Luna Jernberg [Wed, 9 Dec 2020 21:05:25 +0000 (21:05 +0000)]
Update Swedish translation
Matthias Clasen [Wed, 9 Dec 2020 16:32:09 +0000 (16:32 +0000)]
Merge branch 'ebassi/popcount' into 'master'
Share the popcount() fallback for MSVC
See merge request GNOME/gtk!2940
Matthias Clasen [Wed, 9 Dec 2020 16:10:04 +0000 (16:10 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Remove NoDisplay from demo desktop files
Closes #2932
See merge request GNOME/gtk!2939
Emmanuele Bassi [Wed, 9 Dec 2020 15:48:09 +0000 (15:48 +0000)]
Share the popcount() fallback for MSVC
We use __builtin_popcount() in a couple of places, so it makes sense to
have it in one header.
Matthias Clasen [Wed, 9 Dec 2020 15:52:55 +0000 (10:52 -0500)]
widget-factory: Autoplay the video
The empty video on the frontpage is a bit of a letdown, since
the big arrow can't be clicked.
Matthias Clasen [Wed, 9 Dec 2020 15:05:54 +0000 (10:05 -0500)]
Remove NoDisplay from demo desktop files
When these are installed (in particular, as flatpaks),
we should not hide them.
Fixes: #2932
Matthias Clasen [Wed, 9 Dec 2020 15:04:01 +0000 (15:04 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'
Wip/carlosg/for master
Closes #3426 and #3264
See merge request GNOME/gtk!2933
Matthias Clasen [Wed, 9 Dec 2020 13:35:54 +0000 (13:35 +0000)]
Merge branch 'wip/jimmac/row-transitions-and-spacing' into 'master'
Adwaita: row transitions and spacing
Closes #3434
See merge request GNOME/gtk!2937
Matthias Clasen [Wed, 9 Dec 2020 13:34:21 +0000 (13:34 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master
Closes #3431
See merge request GNOME/gtk!2938
Matthias Clasen [Wed, 9 Dec 2020 13:20:20 +0000 (13:20 +0000)]
Merge branch 'ebassi/4-0-abi-bump' into 'master'
Ebassi/4 0 abi bump
Closes #3392
See merge request GNOME/gtk!2883
Emmanuele Bassi [Mon, 23 Nov 2020 18:02:12 +0000 (18:02 +0000)]
build: Bump up the SONAME for GTK4
We released all the 3.9x development snapshots using:
libgtk-4.0.so.0.xxxx.y
which means that the 4.0.0 release of GTK will have a lower SONAME than
the snapshots. To avoid that, bump the SONAME to 1.xxxx.y.
Fixes: #3392
Emmanuele Bassi [Mon, 23 Nov 2020 17:58:43 +0000 (17:58 +0000)]
build: Tie interface age to the development cycle
We don't want to increase the interface age manually, because we're
going to end up forgetting about it.
Instead, we should tie it to the rest of the version:
- in stable (even minor) cycles, we don't add new API; the interface
age is the same as the micro version
- in unstable (odd minor) cycles, every new release might have new API,
or updates to newly added API; keep the interface age to 0
This removes one more manual thing to change during release, and keeps
us honest with our promise not to add symbols during stable cycles.
Emmanuele Bassi [Tue, 8 Dec 2020 17:37:46 +0000 (17:37 +0000)]
Prepare version macros for 4.0
Remove the 3.9x version macros, and ensure that we handle 4.0 as the
backstop for the minimum required version.
Jakub Steiner [Wed, 9 Dec 2020 10:52:49 +0000 (11:52 +0100)]
Adwaita: row transitions and spacing
- no fading out of row hovers. Many feel like it's a slow
refresh rather than intentional effect.
- give some margin to navigation lists
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3434
Yuri Chornoivan [Wed, 9 Dec 2020 07:08:51 +0000 (07:08 +0000)]
Update Ukrainian translation
Matthias Clasen [Wed, 9 Dec 2020 05:51:00 +0000 (05:51 +0000)]
Merge branch 'ebassi/prop-names' into 'master'
Ebassi/prop names
See merge request GNOME/gtk!2936
Matthias Clasen [Wed, 9 Dec 2020 00:53:10 +0000 (00:53 +0000)]
Merge branch 'sophie-h-master-patch-62064' into 'master'
gtk-demo: Remove potentially ableist metaphor
See merge request GNOME/gtk!2934
Matthias Clasen [Wed, 9 Dec 2020 00:52:53 +0000 (00:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3451
See merge request GNOME/gtk!2935
Emmanuele Bassi [Wed, 9 Dec 2020 00:11:49 +0000 (00:11 +0000)]
Rename GtkWindow:fullscreen to :fullscreened
Having a property with the same name of a method makes some languages
which put properties and method names in the same flat namespace not
really happy about our choices. To avoid collisions, let's put the the
"fullscreen" property into the past, alongside the "maximized" property.
Emmanuele Bassi [Tue, 8 Dec 2020 23:49:45 +0000 (23:49 +0000)]
Fix the documentation for GtkWindow state properties
Drop the "don't write code that crashes" folksy bit; don't start
sentences with conjunctions; remove copy-pasted references to
"iconified" states; point to the corresponding property notification in
a consistent manner.
Matthias Clasen [Tue, 8 Dec 2020 22:50:14 +0000 (17:50 -0500)]
Mark flaky tests as flaky
We can't mark these as xfail, since it sometimes succeed.
Sophie Herold [Tue, 8 Dec 2020 23:02:03 +0000 (23:02 +0000)]
gtk-demo: Remove potentially ableist metaphor
Matthias Clasen [Sun, 6 Dec 2020 16:00:35 +0000 (11:00 -0500)]
Add bug reporting address to pot files
Fixes: #3451
Carlos Garnacho [Tue, 8 Dec 2020 22:13:50 +0000 (23:13 +0100)]
gtk/main: Keep implicit grab until all buttons are released
Currently, the implicit grab is broken on the first button release,
in the case of pressing multiple buttons simultaneously. This means
that we emit crossing events early, and the next button releases
are sent to the pointer focus widget instead.
Consider the implicit grab effective until all buttons are released,
and only unset the pointer implicit grab (and emit crossing events)
after there are no further buttons pressed. We do this by checking
event modifiers, given button release events do contain the modifiers
in effect at the time the event was generated, we have to look for
exactly one active button modifier.
Fixes weird pointer states after pressing multiple buttons on a
widget.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
Carlos Garnacho [Tue, 8 Dec 2020 20:33:06 +0000 (21:33 +0100)]
gdk/surface: Delay gdk_surface_request_motion() requests internally
Those requests are received while dealing with the ::layout frame
clock phase, this has the unintended side effect of making the
frame clock "rewind" to handle ::flush-events again during this
frame, which delays everything and practically halves the frame
rate.
We do intend to make the motion events dispatches on the next frame,
so do this in an idle at a slightly lower priority than layout/draw,
so the ::flush-events phase is actually requested for the next frame.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3264
Carlos Garnacho [Tue, 8 Dec 2020 13:45:16 +0000 (14:45 +0100)]
gkt/textview: Set an iter position for event-less menu activation
This went missing. Use the current insertion position as a reference.
Fixes invoking the menu via keyboard.
Matthias Clasen [Tue, 8 Dec 2020 20:32:51 +0000 (20:32 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
macos: fix macOS build breakage
See merge request GNOME/gtk!2931
Yuri Chornoivan [Tue, 8 Dec 2020 20:25:26 +0000 (20:25 +0000)]
Update Ukrainian translation
Florentina Mușat [Tue, 8 Dec 2020 19:52:12 +0000 (19:52 +0000)]
Update Romanian translation
Christian Hergert [Tue, 8 Dec 2020 19:29:31 +0000 (11:29 -0800)]
macos: fix macOS build breakage
Fixes breakages due to recent refactoring around sizing changes.
Matthias Clasen [Tue, 8 Dec 2020 17:04:47 +0000 (12:04 -0500)]
Mark the window-show-contents-on-map.ui reftest as xfail
We know now what the test is trying to test, just lack
the right plumbing to do it properly. So, keep the test
around, marked as expected fail.
Matthias Clasen [Tue, 8 Dec 2020 16:45:52 +0000 (11:45 -0500)]
Revert "reftests: Remove window-show-contents-on-map.ui test"
This reverts commit
074b933ae4e866d092edd734fd43524e39033b5e.
Matthias Clasen [Tue, 8 Dec 2020 15:57:27 +0000 (10:57 -0500)]
3.99.5
Matthias Clasen [Tue, 8 Dec 2020 15:44:33 +0000 (10:44 -0500)]
docs: Remove a mention of gtk_window_get_size
That function has been removed.
Matthias Clasen [Tue, 8 Dec 2020 15:38:36 +0000 (15:38 +0000)]
Merge branch 'wip/surface-state-rework' into 'master'
Rework surface state and geometry computation
See merge request GNOME/gtk!2885
Jakub Steiner [Tue, 8 Dec 2020 14:18:44 +0000 (14:18 +0000)]
Merge branch 'wip/jimmac/no-inner-shadow-sidebars' into 'master'
Adwaita: no 3d shadow for pressed sidebar
Closes #3413
See merge request GNOME/gtk!2928
Jonas Ådahl [Tue, 8 Dec 2020 13:22:59 +0000 (14:22 +0100)]
reftests: Remove window-show-contents-on-map.ui test
It tested that a widget shown after the window was mapped deals with
window resizing appropriately when doing the follow-up allocation. Now,
doing this only allocates both at the same time, as allocation happens
during the frame dispatch.
To do the equivalent now, one would have to write code that shows the
label after the first frame was drawn, and that's not possible via a
reftest, so lets remove it.
Jonas Ådahl [Tue, 8 Dec 2020 11:03:18 +0000 (12:03 +0100)]
reftests/textview-tags: Hide text view cursor
Otherwise it'd sometimes show up, causing test flakyness.
Matthias Clasen [Tue, 8 Dec 2020 00:06:19 +0000 (00:06 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
macos: various GL context cleanups
See merge request GNOME/gtk!2929
Jonas Ådahl [Mon, 7 Dec 2020 21:41:36 +0000 (22:41 +0100)]
testsuite/notify: Don't fiddle with GtkWidget::visible
It may map toplevel windows with arbitrary modes, which will effect
other properties, such as GtkWindow::maximized and
GtkWindow::fullscreen.
Jonas Ådahl [Mon, 7 Dec 2020 21:29:51 +0000 (22:29 +0100)]
testsuite/filtermodel: Remove calls to gtk_widget_realize()
They don't do what they used to do.
Christian Hergert [Mon, 7 Dec 2020 19:47:51 +0000 (11:47 -0800)]
macos: use CGLSetParameter and CGLEnable
We don't need to go through the NSOpenGLContext for these.
We can just use the C API directly. It's also clearer what is using
CGLEnable() vs CGLSetParameter().
Jonas Ådahl [Mon, 7 Dec 2020 17:18:38 +0000 (18:18 +0100)]
gdk: Replace 'WITHDRAWN' state with async 'is-mapped' boolean
It was used by all surfaces to track 'is-mapped', but still part of the
GdkToplevelState, and is now replaced with a separate boolean in the
GdkSurface structure.
It also caused issues when a widget was unmapped, and due to that
unmapped a popover which hid its corresponding surface. When this
surface was hidden, it emitted a state change event, which would then go
back into GTK and queue a resize on popover widget, which would travel
back down to the widget that was originally unmapped, causing confusino
when doing future allocations.
To summarize, one should not hide widgets during allocation, and to
avoid this, make this new is-mapped boolean asynchronous when hiding a
surface, meaning the notification event for the changed mapped state
will be emitted in an idle callback. This avoids the above described
reentry issue.
Jonas Ådahl [Mon, 7 Dec 2020 15:04:01 +0000 (16:04 +0100)]
gtk/headerbar: Remove unused 'state' field
Matthias Clasen [Sat, 5 Dec 2020 17:41:52 +0000 (12:41 -0500)]
Mention window sizes in the migration guide
Matthias Clasen [Sat, 5 Dec 2020 17:29:17 +0000 (12:29 -0500)]
docs: Add gtk_window_is_fullscreen
Matthias Clasen [Sat, 5 Dec 2020 17:28:50 +0000 (12:28 -0500)]
popup: Documentation tweaks
Use proper syntax for referring to signals.
Matthias Clasen [Sat, 5 Dec 2020 17:15:24 +0000 (12:15 -0500)]
Properly remove gtk_window_get_size
It was still in the headers and the docs, but did
not have an implementation anymore.
Jonas Ådahl [Mon, 7 Dec 2020 08:41:54 +0000 (09:41 +0100)]
tests/animated-resizing: Use gtk_window_default_size() instead
This will actually make it resize on-demand, as the default size is the
size used when computing the window size when the size is not fixed.
Jonas Ådahl [Sat, 5 Dec 2020 14:57:45 +0000 (15:57 +0100)]
wayland/toplevel: Don't alwyas skip changing xdg_toplevel state
We only called xdg_toplevel.(un)set_maximize() if the toplevel layout
changed, but this misses the case when the compositor had changed the
maximized state. Change it to call the xdg_toplevel request if either
the local layout changed, or if the layout differs from the current
state.
This fixes an issue where one couldn't unmaximize a window by double
clicking the titlebar that, had previously been maximized e.g. using a
keyboard binding.
Do the same for fullscreen.
Jonas Ådahl [Sat, 5 Dec 2020 11:22:25 +0000 (12:22 +0100)]
gtk/window: Add 'fullscreen' prop and gtk_window_is_fullscreen()
This makes it possible to set 'fullscreen' to 'true' in a .ui file to
start an application in fullscreen mode.
Jonas Ådahl [Sat, 5 Dec 2020 11:11:25 +0000 (12:11 +0100)]
gtk/window: Make R/O is-maximized R/W maximized prop
This makes it possible to set 'maximized' to true in .ui files, and the
window will show up maximized.
gtk_window_is_maximized() will return the intended maximized state until
actually mapped, it will then show the actual maximized state. The same
applies to reading the property.
Jonas Ådahl [Sat, 5 Dec 2020 10:44:51 +0000 (11:44 +0100)]
gtk/window: Make 'default-size' adapt to configured size
This commit changes the behavior of window size computation and the
default size properties to:
* The default-width and default-height properties are updated to the
current window size unless the size is fixed by e.g. being maxmized,
tiled etc.
* The compute-size semantics are to just pick the default size, or if
not adequate, use the measured size, and consequently update the
default size, unless unresizable.
* gtk_window_get_size() is removed, what's more likely relevant is the
gtk_window_get_default_size() which will now contain more sensible
values.
Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.
This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.
Jonas Ådahl [Sat, 5 Dec 2020 10:40:47 +0000 (11:40 +0100)]
x11/surface: Avoid resizing if computed size didn't change
This fixes an issue where we'd resize to the previous window size during
interactive resize.
Jonas Ådahl [Sat, 5 Dec 2020 10:38:17 +0000 (11:38 +0100)]
x11/surface: Move the scattered compute-size calls to helper
This simplifies things, and fixes issue where we'd resize the wrong
time, and miss resizing other times.
Jonas Ådahl [Sat, 5 Dec 2020 10:30:45 +0000 (11:30 +0100)]
x11/surface: Remember the toplevel layout
Jonas Ådahl [Sat, 5 Dec 2020 10:13:07 +0000 (11:13 +0100)]
x11/surface: Compute size after update too
This will sometimes mean a frame is skipped if a resize was requested
during the update phase of the frame dispatch. Not doing so can cause
trying to allocate a window smaller than the minimum size of the widget.
Jonas Ådahl [Sat, 5 Dec 2020 10:02:58 +0000 (11:02 +0100)]
x11/surface: Remember when there is a pending ConfigureNotify
This will be used to decide whether to try to resize windows when .
Jonas Ådahl [Fri, 4 Dec 2020 23:11:08 +0000 (00:11 +0100)]
gdk/surface: Allow inhibit layout from backend
If compute_size() returns TRUE, the layout will not be propagated to
GTK. This will be used by the X11 backend to queue asynchronous resizes
that shouldn't yet allocate in GTK.
Jonas Ådahl [Fri, 4 Dec 2020 23:07:21 +0000 (00:07 +0100)]
x11: Use resize counting for freezing updates too
It's already keep strack of when we're waiting for configure events, so
lets reuse it. This fixes an issue where reshown dialogs wouldn't
reappear.
Jonas Ådahl [Fri, 4 Dec 2020 17:39:22 +0000 (18:39 +0100)]
wayland/surface: Reset last sent min/max size when hiding
As with the window geometry, the last sent min/max values must be reset
so they are sent again next time the surface is shown.
Jonas Ådahl [Fri, 4 Dec 2020 17:35:01 +0000 (18:35 +0100)]
wayland/surface: Clear shadow width when hiding
Not doing this means the next time the same surface is shown, if the
shadow size wasn't changed, it wouldn't be sent to the compositor, which
then would result in compositor deriving its own window geometry which
would include the shadow margin.
This fixes an issue where the file chooser dialog would grow each time
it opened.
Jonas Ådahl [Fri, 4 Dec 2020 14:40:53 +0000 (15:40 +0100)]
x11/surface: Compute toplevel size outside of frame dispatch
We can't compute and resize a toplevel size during dispatch, as resizing
on X11 is an asynhronous operation, requiring a configuration event.
Jonas Ådahl [Fri, 4 Dec 2020 14:02:59 +0000 (15:02 +0100)]
tests/animated-resizing: Don't try to resize during frame dispatch
This will not work on X11 because it's too late to resize, due to
resizing being asynchronous i.e. it won't be complete before we need to
draw.
Jonas Ådahl [Fri, 4 Dec 2020 10:18:09 +0000 (11:18 +0100)]
gtk/native: Remove gtk_native_check_resize()
This is now handle by the corresponding implemenatations using per
non-gobject-type API.
Jonas Ådahl [Fri, 4 Dec 2020 10:11:05 +0000 (11:11 +0100)]
gtk/dragicon: Use private gtk_drag_icon_present() instead of GtkNative
It didn't even use GtkNative, just the vfunc it set to the interface
sturct.
Jonas Ådahl [Fri, 4 Dec 2020 10:06:25 +0000 (11:06 +0100)]
gtk/tooltipwindow: Use gtk_tooltip_window_present() instead of GtkNative
Jonas Ådahl [Fri, 4 Dec 2020 09:53:16 +0000 (10:53 +0100)]
gtk/texthandle: Use gtk_text_handle_present() instead of GtkNative
Jonas Ådahl [Fri, 4 Dec 2020 08:23:46 +0000 (09:23 +0100)]
gtk/window: Don't go via GtkNative when presenting
It'll only call directly back into GtkWindow's toplevel present handling
code.
Jonas Ådahl [Fri, 4 Dec 2020 08:20:50 +0000 (09:20 +0100)]
gtk/popover: Use gtk_popover_present() instead of going via GtkNative
This makes it more explicit that managers of popovers make it "present".
Jonas Ådahl [Fri, 4 Dec 2020 08:15:53 +0000 (09:15 +0100)]
gtk/entry: Remove emoji chooser field
It wasn't ever set.
Jonas Ådahl [Fri, 4 Dec 2020 08:12:22 +0000 (09:12 +0100)]
gtk/popover: Request fake motion events for popovers too
As with GtkWindow, we need to request fake motion events if allocation
changes, to emulate motion events given the new layout.
Jonas Ådahl [Fri, 4 Dec 2020 07:04:58 +0000 (08:04 +0100)]
gdk/surface: Emit layout event while frozen
The allocation of popups are part dependent of the allocation of the
root, which means the root must still be allocated when updates are
frozen, otherwise we'll try to allocate non-laid out popups.
Jonas Ådahl [Thu, 3 Dec 2020 22:20:31 +0000 (23:20 +0100)]
gdk/popup: Remove the popup-layout-changed signal
It was replaced with GdkSurface::layout.
Jonas Ådahl [Thu, 3 Dec 2020 21:50:31 +0000 (22:50 +0100)]
gtk/window: Only fake motion events on windows with pending allocations
This fixes an issue where the focus of the window continuously received
fake motion events even when a popover was open, making input events end
up behind the popover.
It also adds a comment describing why motion events are requested. Note
that popovers won't work with this, and it's possible both in the past
and now that sporadic missplaced motion events will appear, e.g. when a
window changes allocation but a popover is open.
Jonas Ådahl [Wed, 2 Dec 2020 16:08:43 +0000 (17:08 +0100)]
gdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width'
This makes it more consistent with everywhere else.
Jonas Ådahl [Wed, 2 Dec 2020 16:08:07 +0000 (17:08 +0100)]
gdk: Remove GdkSurface::size-changed
It's not emitted, and everyone should use the GdkSurface::layout signal
from now on.
Jonas Ådahl [Wed, 2 Dec 2020 15:44:59 +0000 (16:44 +0100)]
gtk/window: Minor cleanup
Jonas Ådahl [Wed, 2 Dec 2020 15:44:49 +0000 (16:44 +0100)]
gtk/window: Remove out-dated comment
Jonas Ådahl [Wed, 2 Dec 2020 15:44:25 +0000 (16:44 +0100)]
gtk/window: Use default size if non-resizable if set
Jonas Ådahl [Wed, 2 Dec 2020 14:29:54 +0000 (15:29 +0100)]
gdk: Replace all GDK_CONFIGURE usage with GdkSurface::layout
This removes the GDK_CONFIGURE event and all related functions and data
types; it includes untested changes to the MacOSX, Win32 and Broadway
backends.
Christian Hergert [Mon, 7 Dec 2020 19:27:11 +0000 (11:27 -0800)]
macos: we only need 24-bit for color
Emmanuele Bassi [Mon, 7 Dec 2020 15:23:55 +0000 (15:23 +0000)]
Merge branch 'ebassi/activate-signal' into 'master'
Add accessors for GtkWidgetClass.activate_signal
See merge request GNOME/gtk!2925
Jakub Steiner [Mon, 7 Dec 2020 13:19:24 +0000 (14:19 +0100)]
Adwaita: no 3d shadow for pressed sidebar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3413
Jakub Steiner [Mon, 7 Dec 2020 09:58:12 +0000 (10:58 +0100)]
Revert "Adwaita: avoid clipping menu shadows"
While the workaround hides majority of the issue there are still two big downsides:
- shadow does eat from the widget dimensions so alignment is broken
- situations like popover going upwards on screen edge break completely
The appropriate action is to revert these theme duct tape solutions to make room
for a proper fix.
This reverts commit
b3dba1dca66d380d1cfafbe92b36d7854b3f4244.
Issue https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
Jonas Ådahl [Wed, 2 Dec 2020 13:58:45 +0000 (14:58 +0100)]
gdk: Always get shadow width via GdkToplevelSize
This removes the gdk_surface_set_shadow_width() function and related
vfuncs. The point here is that the shadow width and surface size can now
be communicated to GDK atomically, meaning it's possible to avoid
intermediate stages where the surface size includes the shadow, but
without the shadow width set, or the other way around.
Jonas Ådahl [Wed, 2 Dec 2020 13:13:32 +0000 (14:13 +0100)]
wayland: Stop emitting size-changed
It's dealt with by GdkSurface::layout now.
Jonas Ådahl [Wed, 2 Dec 2020 10:59:23 +0000 (11:59 +0100)]
gtk: Allocate everything from GtkNativeClass::layout
This changes allocation of the widget trees to happen as a side effect
to the GdkSurface::layout signal, which first passes the GtkNative
instance where it is then forwarded to the implementations of the
GtkNative interface.
The implementations of GtkNative are the ones doing the actual
gtk_widget_allocate(), and they do so in their GtkNativeClass::layout
function.
Jonas Ådahl [Wed, 2 Dec 2020 16:42:42 +0000 (17:42 +0100)]
gtk/window: Only deal with shadow when (ex|in)cluding csd size
The size should correspond what gtk_widget_measure() does, and it
measures what's within the window excluding the shadow; so make this
helper function correspond to this.